<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/jsp/comm_css_include.jsp"%>
<!doctype html>
<html>
<head>
</head>
<body class="gray-bg">
	<!-- 隐藏域 -->
	<input id="busiId" name="busiId" type="hidden" />
	<!-- 隐藏域 -->
	<div class="container creditbody">
		<div class="iboxtitle">
			<span><i class="glyphicon glyphicon-map-marker"></i>&nbsp;贷中业务>贷中信息登记>银行放款</span>
			<a href="javascript:void(0)"></a>
		</div>
		<div class="ibox-content ibox-con">
			<div class="buttonfixed" style="display: none;">
				<button type="button" class="btn dpbtn_blue"  name="allocation" onclick="allocation();">提交</button>
			</div>
			<%@include file="/jsp/auto_yw_info_include.jsp"%>
		</div>
		
		<div class="business-manwife clear-both">开卡附件资料</div>
    	<div class="business-padding">
    		<div class="zx-addimg">
	         	<ul id='HZ_YIN_HANG_KAIKA_ZILIAO'>
            		<li><img
						filelabel="${attachmentLabelNames.EDU_HEDING_SQBIAO }"
						src="${basePath}/img/shangchuanzhaopian.png" width="110px"
						height="110px"
						class="zx-imgPre ${attachmentLabelNames.EDU_HEDING_SQBIAO }">
						<span
						filelabelDelSpan="${attachmentLabelNames.EDU_HEDING_SQBIAO }"
						class="hidden bt-cancle glyphicon glyphicon-trash"
						onclick="deleleFileRecord(this,'${attachmentLabelNameValues.EDU_HEDING_SQBIAO }',false);"></span>
						<div class="img-layer">
							<div></div>
							<span
								filelabelLabelSpan="${attachmentLabelNames.EDU_HEDING_SQBIAO }">${attachmentLabelNameValues.EDU_HEDING_SQBIAO }</span>
						</div>
						<div filelabelDiv="${attachmentLabelNames.EDU_HEDING_SQBIAO }"
							class="hidden button-des">
							<a type="button"
							class="abuttonStylele"  filelabelADown="${attachmentLabelNames.EDU_HEDING_SQBIAO }"
								download="shangchuanzhaopian.png"
								href="${basePath}/img/shangchuanzhaopian.png">下载</a> <a
								type="button" class="abuttonStyleri"  onclick="showImg(this);">详情</a>
						</div> <a href="javascript:void(0);" class="file"> <span>上传资料</span>
							<input type="file"
							accept="image/gif,image/jpeg,image/bmp,image/png,image/jpg"
							onchange="uploadFile(this,'${modeIDTypeNames.SQKK }','HZ_YIN_HANG_KAIKA_ZILIAO', false, false);" />
					</a></li>
					
					<li><img
						filelabel="${attachmentLabelNames.HZ_KAIKA_SQBIAO }"
						src="${basePath}/img/shangchuanzhaopian.png" width="110px"
						height="110px"
						class="zx-imgPre ${attachmentLabelNames.HZ_KAIKA_SQBIAO }">
						<span
						filelabelDelSpan="${attachmentLabelNames.HZ_KAIKA_SQBIAO }"
						class="hidden bt-cancle glyphicon glyphicon-trash"
						onclick="deleleFileRecord(this,'${attachmentLabelNameValues.HZ_KAIKA_SQBIAO }',false);"></span>
						<div class="img-layer">
							<div></div>
							<span
								filelabelLabelSpan="${attachmentLabelNames.HZ_KAIKA_SQBIAO }">${attachmentLabelNameValues.HZ_KAIKA_SQBIAO }</span>
						</div>
						<div filelabelDiv="${attachmentLabelNames.HZ_KAIKA_SQBIAO }"
							class="hidden button-des">
							<a type="button"
							class="abuttonStylele"  filelabelADown="${attachmentLabelNames.HZ_KAIKA_SQBIAO }"
								download="shangchuanzhaopian.png"
								href="${basePath}/img/shangchuanzhaopian.png">下载</a> <a
								type="button" class="abuttonStyleri"  onclick="showImg(this);">详情</a>
						</div> <a href="javascript:void(0);" class="file"> <span>上传资料</span>
							<input type="file"
							accept="image/gif,image/jpeg,image/bmp,image/png,image/jpg"
							onchange="uploadFile(this,'${modeIDTypeNames.SQKK }','HZ_YIN_HANG_KAIKA_ZILIAO', false, false);" />
					</a></li>
			</ul>
		</div>	
		</div>		
		<div class="business-manwife">备注信息</div>
		<div class="business-padding">
			<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
				<tr>	
					<td align="right">
						<label class="control-label np">备注信息：</label>
					</td>
					<td>
						<div class="control-div" id="backReason">-</div>
					</td>
				</tr>
			</table>
		</div>
		<%@include file="/jsp/comm_js_include.jsp"%>
		<!-- 文件上传 -->
 		<%@include file="/jsp/common_fileupload_multi_include.jsp"%>
		
		<script type="text/javascript">
			$(function(){
				var busiId = $.getUrlData("busiId");
				var status = $.getUrlData("status");
				if(status == "" || status < 5){
					$(".buttonfixed").show();
				}
		 		$('#busiId').val(busiId);
		    	showAttentment($('#busiId').val(), null, '${modeIDTypeNames.SQKK }');
		    	getBackReason();
			})
			
			var getBackReason=function(){
				var data = {};
				data.busiId =$.getUrlData("busiId");
				$.dpAjax({
		    		url:'${basePath}/YwOpenCardHzicbcController/selectRefined',
		    		data:data,
	    			success: function(datas){
	    				if(datas.result){
		    				$("#backReason").text(datas.result.reasonBack);
	    				}else{
	    					$("#backReason").text('-');
	    				}
						
	                 }
		    	});
			}
			
		 	function allocation(){
		 		var ticheimg = $("#HZ_YIN_HANG_KAIKA_ZILIAO").find("li:eq()").children("img").attr("src");
				var morenimg = "${basePath}/img/shangchuanzhaopian.png";
				if(morenimg==ticheimg || ticheimg==""){
					layer.msg("请上传专项额度核定申请表", {icon: 5});
					return;
				}
				//提车资料
				var ticheimgb = $("#HZ_YIN_HANG_KAIKA_ZILIAO").find("li:eq(0)").children("img").attr("src");
				var morenimgb = "${basePath}/img/shangchuanzhaopian.png";
				if(morenimgb==ticheimgb || ticheimgb==""){
					layer.msg("请上传开卡申请表", {icon: 5});
					return;
				}
				
				layer.confirm('确认提交？操作人：<span style="color:#BD1723;">${current_user_key.uname}</span>', {
		 		  	btn: ['确定','取消'] //按钮
		 		}, function(){
		 			layer.closeAll();
					var data = {};
					data.busiId = $('#busiId').val();
					$.dpAjax({
			    		url:'${basePath}/YwOpenCardHzicbcController/updateOpenCardStatus',
			    		data:data,
		    			success: function(datas){
		    				layer.msg('执行成功！', {icon: 6});
		    				setTimeout(function () {
					 			window.location.href = "${basePath}/web/system/yw/autoOpenCardFujianList.jsp";
					 		}, 3000);
							return;
		                 }
			    	});
		 		})	
		 	}
		 	
    	</script>
</body>
</html>
